#

import time

'''
test that class is a code block and classmethod
'''
class Property:
    print "this is property class"
    classname = "classname"
    def __init__(self, name):
        self.name = name


    @classmethod
    def classMethod(cls):
        print "class name is %s" % cls.classname


print "test modules, out of main codes"

def tailfile(filename):
    filefd = open(filename)
    filefd.seek(0,0)
    while True:
        line = filefd.readline()
        if not line:
            time.sleep(0.1)
            continue
        yield line
    

def coroutines(func):
    def wrapper(*args, **kwargs):
        cr = func(*arg, **kwargs)
        cr.next()
        return cr
    return wrapper


def print_params(x, y, z, *args, **kwargs):
    print x,y,z
    print args
    print kwargs
    

if __name__ == "__main__":
    '''
    p = Property("prname")
    p.classMethod()

    tailge = tailfile("/var/log/haproxy.log")
    for line in tailge:
        print line

    '''

    '''
    print_params(1,2,z=3, info=5, 9)
    '''



    print "programe finish"


